package com.molichuxing.services.infrastructure.dao;

import com.molichuxing.framework.dao.RootMapper;
import com.molichuxing.services.infrastructure.bean.PaymentDetailBean;
import com.molichuxing.services.infrastructure.dto.response.PaymentDetailDownloadDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PaymentDetailMapper extends RootMapper<PaymentDetailBean> {

    /**
     * 查询支付详情信息
     *
     * @param paymentId 支付id
     * @param type      类型
     * @return
     */
    List<PaymentDetailBean> getPaymentDetail(@Param("paymentId") Integer paymentId, @Param("type") Integer type);

    /**
     * 根据类型查询支付详情
     *
     * @param type 类型
     * @return
     */
    List<PaymentDetailBean> getPaymentDetailByType(@Param("type") Integer type);

    /**
     * 批量添加
     *
     * @param list
     * @return
     */
    int createBatch(List<PaymentDetailBean> list);

    /**
     * 查询保证金
     *
     * @param paymentIds
     * @param type
     * @return
     */
    List<PaymentDetailBean> getDeposit(@Param("paymentIds") List<Integer> paymentIds, @Param("type") Integer type);

    List<PaymentDetailDownloadDto> getPaymentDetailDownload(@Param("paymentIds") List<Integer> paymentIds);
}